<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
    xmlns:s="http://jboss.com/products/seam/taglib"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:rich="http://richfaces.org/rich"
	xmlns:a="http://richfaces.org/a4j"
    template="/layout/template.xhtml">

<ui:define name="body">

	<h:form id="createTravelForm">
		<rich:panel>
			<f:facet name="header">Summary</f:facet> 
			<h:panelGrid columns="2">
                <h:graphicImage value="/img/seamlogo.png" alt="Seam logo"/>
                <s:div styleClass="info">
                    <p><strong>Your travel is about to be created!</strong> Check whether this info is OK:</p>
                    

                    
                    <h:outputText value="User: #{credentials.username}"/><br/>
                    <h:outputText value="Travel name: #{travelCreationData.travelName}"/><br/>
                    <h:outputText value="Seats available in the travel: #{travelCreationData.seatAmount}"/><br/>
                    <h:outputText value="From city: #{cityManager.find(travelCreationData.fromCity).name}" rendered="#{travelCreationData.locationType.equals('city')}"/><br/>
                    <h:outputText value="To city: #{cityManager.find(travelCreationData.toCity).name}" rendered="#{travelCreationData.locationType.equals('city')}"/><br/>
                    <h:outputText value="From coordiantes: (#{travelCreationData.fromLat} , #{travelCreationData.fromLon})" rendered="#{travelCreationData.locationType.equals('maps')}"/><br/>
                    <h:outputText value="To coordiantes: (#{travelCreationData.toLat} , #{travelCreationData.toLon})" rendered="#{travelCreationData.locationType.equals('maps')}"/><br/>
                </s:div>
            </h:panelGrid>
		</rich:panel>

        
        <div class="actionButtons">

            <h:commandButton id="save"
                          value="Save"
                         action="#{createTravelBean.saveTravelAction}"/>
        </div>
		
	</h:form>
        
        
</ui:define>
</ui:composition>
